export const state = {
 	isLogin: false,
 	//currentUser: {}
 };


 export const mutations = {
 	login(state, userInfo) {
		console.info("登录成功");
		console.info(userInfo);
 		state.isLogin = true;
 		state.userInfo = userInfo;
 		uni.setStorageSync("isLogin", '1');
 		uni.setStorageSync("accessToken", userInfo.tokenInfo.tokenValue);
		uni.setStorageSync("accessTokenName", userInfo.tokenInfo.tokenName);
 		uni.setStorageSync('userInfo', userInfo.userInfo);
 	},
 	logout(state) {
 		state.isLogin = false;
 		state.userInfo = {};
		//清除所有缓存
		uni.clearStorageSync();
		
 		console.log('退出登录')
 	}
 }
